;Assembler header file for FPEmulator
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:03:53 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 29 Apr 1994

        [       :LNOT: :DEF: FPEmulator_Hdr
        GBLS    FPEmulator_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

;Symbols for constants
FPEmulator_NoContext            *       &0
FPEmulator_DefaultContext       *       &FFFFFFFF
FPEmulator_CurrentContext       *       &FFFFFFFE
FPEmulator_FPSRCumulativeIVO    *       &1
FPEmulator_FPSRCumulativeDVZ    *       &2
FPEmulator_FPSRCumulativeOFL    *       &4
FPEmulator_FPSRCumulativeUFL    *       &8
FPEmulator_FPSRCumulativeINX    *       &10
FPEmulator_FPSRControlND        *       &100
FPEmulator_FPSRControlNE        *       &200
FPEmulator_FPSRControlSO        *       &400
FPEmulator_FPSRControlEP        *       &800
FPEmulator_FPSRControlAC        *       &1000
FPEmulator_FPSREnableIVO        *       &10000
FPEmulator_FPSREnableDVZ        *       &20000
FPEmulator_FPSREnableOFL        *       &40000
FPEmulator_FPSREnableUFL        *       &80000
FPEmulator_FPSREnableINX        *       &100000
FPEmulator_FPSRSystemID         *       &FF000000
FPEmulator_FPSRSystemIDShift    *       24
FPEmulator_FPSRSystemClass      *       &80000000
FPEmulator_FPSRSystemClassShift *       31
FPEmulator_SystemOldFPE         *       0
FPEmulator_SystemFPE400         *       1
FPEmulator_SystemFPPC           *       128
FPEmulator_SystemFPA            *       129
FPEmulator_ClassSoftware        *       0
FPEmulator_ClassHardware        *       1

;Symbols for structure offsets and sizes
FPEmulator_Context              *       4 ;abstract type
                                ^       0
                                #       Bits
FPEmulator_FPSR                 *       @

                                ^       0
FPEmulator_RegisterDump_fpsr    #       FPEmulator_FPSR
FPEmulator_RegisterDump_f0      #       12*Byte
FPEmulator_RegisterDump_f1      #       12*Byte
FPEmulator_RegisterDump_f2      #       12*Byte
FPEmulator_RegisterDump_f3      #       12*Byte
FPEmulator_RegisterDump_f4      #       12*Byte
FPEmulator_RegisterDump_f5      #       12*Byte
FPEmulator_RegisterDump_f6      #       12*Byte
FPEmulator_RegisterDump_f7      #       12*Byte
FPEmulator_RegisterDump         *       @


;Symbols for SWI's and SWI reason codes
XFPEmulator_Version             *       &60480
FPEmulator_Version              *       &40480
   ;Exit
   ;  R0 = version (Int)

XFPEmulator_DeactivateContext   *       &60481
FPEmulator_DeactivateContext    *       &40481
   ;Exit
   ;  R0 = old_context (FPEmulator_Context)

XFPEmulator_ActivateContext     *       &60482
FPEmulator_ActivateContext      *       &40482
   ;Entry
   ;  R0 = new_context (FPEmulator_Context)

XFPEmulator_ChangedContext      *       &60483
FPEmulator_ChangedContext       *       &40483
   ;Entry
   ;  R0 = new_context (FPEmulator_Context)
   ;Exit
   ;  R0 = old_context (FPEmulator_Context)

XFPEmulator_ContextLength       *       &60484
FPEmulator_ContextLength        *       &40484
   ;Exit
   ;  R0 = context_length (Int)

XFPEmulator_InitContext         *       &60485
FPEmulator_InitContext          *       &40485
   ;Entry
   ;  R0 = context (FPEmulator_Context)

XFPEmulator_ExceptionDump       *       &60486
FPEmulator_ExceptionDump        *       &40486
   ;Exit
   ;  R0 = register_dump (pointer to FPEmulator_RegisterDump)

XFPEmulator_Abort               *       &60487
FPEmulator_Abort                *       &40487
   ;Entry
   ;  R0 = context (FPEmulator_Context)
   ;  R1 = r12_value (Int)
   ;  R2 = pc_value (Int)
   ;Exit
   ;  R0 = frame (pointer to data)

XFPEmulator_LoadContext         *       &60488
FPEmulator_LoadContext          *       &40488
   ;Entry
   ;  R0 = context (FPEmulator_Context)
   ;  R1 -> register_dump (FPEmulator_RegisterDump)

XFPEmulator_SaveContext         *       &60489
FPEmulator_SaveContext          *       &40489
   ;Entry
   ;  R0 = context (FPEmulator_Context)
   ;  R1 = register_dump (pointer to FPEmulator_RegisterDump)
   ;  R2 = pc_value (Int)
   ;Exit
   ;  R0 = has_exception (Bool)

        ]
        END
